package  
{
	/**
	 * ...
	 * @author ...
	 */
	public class Level1 extends Level_Base
	{
		var turret:Turret;
		var inimigo:Inimigo;
		var paredeManager:ParedeManager = new ParedeManager();
		
		var camera:Camera;
		
		public function Level1() 
		{
			
		}
		
		public override function start(): void 
		{
			desenharTela();
		}
		
		public function desenharTela():void
		{
			camera = new Camera(Main.instance.stage.stageWidth, Main.instance.stage.stageHeight);
			
			turret = new Turret();
			turret.x = Main.instance.stage.stageWidth / 2;
			turret.y = Main.instance.stage.stageHeight / 2;
			Main.instance.MC_tela.addChild(turret);
			
			Inimigo.criarInimigos(5); 
		}
		
		public override function update() 	: void 
		{
			turret.update(paredeManager);
			Inimigo.updateinimigos(turret);
			Collisions.verifyCollisions(turret);
			
			camera.x = -turret.x;
			camera.y = -turret.y;
			
		
			
			camera.update();
		}
		
		public override function terminate() : void {}
	}

}